{extend name="$BASE_POPUP_FORM" /}
{block name="body"}
<div class="box-content">
    <input type="hidden" name="id" id="id" value="{$id}"/>
    <div class="control-row col-2">
        
        <div class="control-group">
            <label class="control-label">演员名称</label>
            <div class="controls">
                <input type="text" id="username" name="username" class="form-control required"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                演员头像
            </label>
            <div class="controls">
                <div id="js_upload_wrp">
                    <input type="hidden" id="head_img" name="head_img" value="" class="" />
                    {:hook('picResource',array('name'=>'head_img','folder'=>'head_img','is_cut'=>'1','tips'=>'建议尺寸：240x240像素。仅支持.jpg .png格式。','callback'=>'uploadImgCallback'))}
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">演员分类</label>
            <div class="controls">
                <select name="class_id" id="class_id" class="form-control">
                    <option value="">选择分类</option>
                    {volist name="class_list" id="vo"}
                    <option value="{$vo.id}">{$vo.class_title}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">演员简介</label>
            <div class="controls">
                <input type="text" id="intro" name="intro" class="form-control"/>
            </div>
        </div>
    </div>

</div>
{/block}

{block name="script"}
<script type="text/javascript">
    /**
     * 点击图片删除
     * */
    $('#js_upload_wrp').on("click", ".js_delete", function (e) {
        var _this = $(this);
        _this.parents(".js_edit_pic_wrp").remove();
        // setPicValue()
    });
    function uploadImgCallback(path) {
        $("#head_img").val(path);
    }

    function onLoadDataSuccess(data) {
        if (typeof (onLoadSuccess) !== "undefined")
            onLoadSuccess();
        if(data['wechat_account']) setPicValue("wechat_account", data['wechat_account']);
        // setPicValue("alipay_account", data['alipay_account']);
    }

</script>
{/block}


